﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QlrrPrintService.Common.Command
{
    /// <summary>
    /// 設定列印方向及鏡射功能，
    /// </summary>
    public class Direction:PrintParmMN,IToTSPLCommand
    {
        /// <summary>
        /// 图像打印为imager 鏡射
        /// </summary>
        public Direction() :base(0,1)
        {
        }

        #region IToTSPLCommand 成员

        public byte[] ToTSPLCommandByte(int mm_to_dot)
        {
            return Util.GetEncodingBytes(ToTSPLCommandAscii(mm_to_dot));
        }

        public string ToTSPLCommandAscii(int mm_to_dot)
        {
            return string.Format("DIRECTION {0},{1}{2}", _n, _m, Common.TSPL_END);
        }

        #endregion
    }
}
